﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace black_screen_mode_server.DataCommunication
{
    public class BlackScreenStartData : IPacketData
    {
        public string BeginTime { get; set; }

        //构造函数
        public BlackScreenStartData()
        {
            this.BeginTime = "";
        }
        public void JsonToPacket(string jsonData)
        {
            var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<BlackScreenStartData>(jsonData);
            this.BeginTime = obj.BeginTime;
        }

        public string PacketToJson()
        {
            //对象转json
            return Newtonsoft.Json.JsonConvert.SerializeObject(this);
        }
    }
}
